<?php if (of_get_option('nip_show') != false) { ?>
        <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><?php echo of_get_option('nip_title'); ?></h2>
                </div>
            </div> <!--End nb Heading-->
        <div class="news_pictures">
        <ul class="news_pictures_list">
                <?php
             $nip_display = of_get_option('nip_display'); 
            $nip_tag = of_get_option('nip_tag'); 
            $nip_cat = of_get_option('nip_category');
	     $count = of_get_option('nip_posts');
            ?>
	    <?php if($nip_display == 'category') { ?>
                 <?php query_posts(array('showposts' => $count, 'cat' => $nip_cat )); ?>
	    <?php } ?>
	    <?php if($nip_display == 'lates') { ?>
                 <?php query_posts(array('showposts' => $count )); ?>
	    <?php } ?>

	    <?php if($nip_display == 'tag') { ?>
                 <?php query_posts(array('showposts' => $count, 'tag' => $nip_tag )); ?>
	    <?php } ?>
               
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

	    <?php if(mom_post_image() == false) {} else { ?>
            <li>
	    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=70&amp;w=70&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 70, 70, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
            </li>
            <?php } //mom_post_image == false ?>
            <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
        </ul>      
        </div>  <!--news_pictures-->  
        </div> <!--News Box-->
    </div> <!--Box Outer-->
    <?php } ?>